﻿using Ceremony.API.Model;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Ceremony.API.Infrastructure.EntityConfigurations
{
    public class PrizeSettingEntityTypeConfiguration
        : IEntityTypeConfiguration<PrizeSetting>
    {
        public void Configure(EntityTypeBuilder<PrizeSetting> builder)
        {
            builder.ToTable("PrizeSetting");

            builder.HasKey(ci => ci.Id);

            builder.Property(ci => ci.Id)
               .UseHiLo("prizesetting_hilo")
               .IsRequired();

            builder.Property(cb => cb.StartTime)
                .IsRequired();
            builder.Property(cb => cb.Scene)
               .IsRequired();
        }
    }
}
